Add ElasticsearchIndexDeletionPolicy and EngineConfig policy wrapper#130442
Add ElasticsearchIndexDeletionPolicy and EngineConfig policy wrapper#130442fcofdez merged 15 commits intoelastic:mainfrom
Conversation
kingherc
left a comment
There was a problem hiding this comment.
Awesome work. Some early comments.
server/src/main/java/org/elasticsearch/index/engine/ElasticsearchIndexDeletionPolicy.java
Outdated
Show resolved
Hide resolved
|
|
||
| public abstract boolean hasUnreferencedCommits(); | ||
|
|
||
| public interface CommitsListener { |
There was a problem hiding this comment.
I was thinking about getting rid of this interface since we don't use it anymore, wdyt @kingherc? we can do in a follow-up once all the pieces are in place.
There was a problem hiding this comment.
Hi @fcofdez . Yes I believe it can be removed.
Separately, we were discussing whether IndexModule#setIndexCommitListener() could be removed in this thread with @tlrx , feel free to read to see as well. I had a question whether someone, e.g., externally, like a plugin writer user, might have been using it, but we think no. So that may also be considered for removal. However, maybe an optional follow-up.
There was a problem hiding this comment.
Yep, that was my impression too. I'll remove it in a follow-up so we keep this PRs manageable.
|
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
|
|
||
| public abstract boolean hasUnreferencedCommits(); | ||
|
|
||
| public interface CommitsListener { |
There was a problem hiding this comment.
Hi @fcofdez . Yes I believe it can be removed.
Separately, we were discussing whether IndexModule#setIndexCommitListener() could be removed in this thread with @tlrx , feel free to read to see as well. I had a question whether someone, e.g., externally, like a plugin writer user, might have been using it, but we think no. So that may also be considered for removal. However, maybe an optional follow-up.
server/src/main/java/org/elasticsearch/index/engine/CombinedDeletionPolicy.java
Outdated
Show resolved
Hide resolved
…-tracking * upstream/main: Fix MergeWithLowDiskSpaceIT testRelocationWhileForceMerging (elastic#131806) [ML] Prevent the trained model deployment memory estimation from double-counting allocations. (elastic#131990) ES|QL Assert current thread during query planning and execution (elastic#131807) Add ElasticsearchIndexDeletionPolicy and EngineConfig policy wrapper (elastic#130442) [TEST] Adds tests for ESTestCase randomSubset methods (elastic#131745) Simplify esql session (elastic#131925) Simplify EsqlExecution info serialization (elastic#131823) Add utility to check for project global block (elastic#131927) [DOCS] Update ES|QL applies to's (elastic#131805) Handle structured log messages (elastic#131027) Mute org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT test {p0=search/600_flattened_ignore_above/flattened ignore_above multi-value field} elastic#131967 Mute org.elasticsearch.xpack.remotecluster.CrossClusterEsqlRCS2EnrichUnavailableRemotesIT testEsqlEnrichWithSkipUnavailable elastic#131965 Mute org.elasticsearch.xpack.restart.FullClusterRestartIT testWatcherWithApiKey {cluster=UPGRADED} elastic#131964 [ES|QL] Fix aggregate_metric_double sorting and mv_expand issues (elastic#131658) Reduce logging levels for meter usage tests (elastic#131935)
…lastic#130442) This change adds a new abstract class ElasticsearchIndexDeletionPolicy that allows using different policy implementations for InternalEngine. It also adds an index deletion policy wrapper to the EngineConfig to allow wrapping the default CombinedDeletionPolicy by inheritors of InternalEngine. Relates ES-10929 --------- Co-authored-by: Francisco Fernández Castaño <francisco.fernandez.castano@gmail.com>
Draft pull request for a possible solution for tracking the Lucene commits acquired/released while the underlying engine instances are reset. This solution is based on `LocalCommitsRefs` which tracks the acquired commit generation at the shard level. This instance is then passed to the Lucene index deletion policies used by the IndexEngine and HollowIndexEngine. So far it only take care of commits acquired using `Engine#acquireIndexCommit(boolean)` for snapshots. Local reader tracking is not supported (yet, I hope to be able to reuse `LocalCommitsRefs` there too). If we move forward with this solution, I'll split this draft into multiple PRs. Requires elastic#130442 Relates
Draft pull request for a possible solution for tracking the Lucene commits acquired/released while the underlying engine instances are reset. This solution is based on `LocalCommitsRefs` which tracks the acquired commit generation at the shard level. This instance is then passed to the Lucene index deletion policies used by the IndexEngine and HollowIndexEngine. So far it only take care of commits acquired using `Engine#acquireIndexCommit(boolean)` for snapshots. Local reader tracking is not supported (yet, I hope to be able to reuse `LocalCommitsRefs` there too). If we move forward with this solution, I'll split this draft into multiple PRs. Requires elastic#130442 Relates
This change adds a new abstract class ElasticsearchIndexDeletionPolicy that allows using different policy implementations for InternalEngine.
It also adds an index deletion policy wrapper to the EngineConfig to allow wrapping the default CombinedDeletionPolicy by inheritors of InternalEngine.
Relates ES-10929